#include <stdio.h>
#include <stdlib.h>

int main(void){
  int *ptr = (int *)malloc(sizeof(int));
  *ptr=100;
  printf("ptr:%p,*ptr:%d\n",ptr,*ptr);
  double *ptr2 = (double *)malloc(sizeof(double));
  *ptr2=100.5;
  printf("ptr2:%p,*ptr2:%.2lf\n",ptr2,*ptr2);
  // 手动释放动态分配的内存
  free(ptr);
  return 0;
} 